<template>
  <Layout class="p-5 bg-white">
    <Form :label-width="100">
      <FormItem class="w-100" label="待确认数量">
        <router-link :to="'/paymentStatistics/daiqueren'"
          ><label>{{ PaymentStatistics.DAIQUEREN }}</label></router-link
        >
      </FormItem>
      <FormItem class="w-100" label="已生效数量">
        <router-link :to="'/paymentStatistics/yishengxiao'">
          <label>{{ PaymentStatistics.YISHENGXIAO }}</label>
        </router-link>
      </FormItem>
      <FormItem class="w-100" label="还款中数量">
        <router-link :to="'/paymentStatistics/huankuanzhong'">
          <label>{{ PaymentStatistics.HUANKUANZHONG }}</label>
        </router-link>
      </FormItem>
      <FormItem class="w-100" label="已取消数量">
        <router-link :to="'/paymentStatistics/yiquxiao'">
          <label>{{ PaymentStatistics.YIQUXIAO }}</label>
        </router-link>
      </FormItem>
      <FormItem class="w-100" label="已结清数量">
        <router-link :to="'/paymentStatistics/yijieqing'">
          <label>{{ PaymentStatistics.YIJIEQING }}</label>
        </router-link>
      </FormItem>
      <FormItem class="w-100" label="未通过数量">
        <router-link :to="'/paymentStatistics/weitongguo'">
          <label>{{ PaymentStatistics.WEITONGUO }}</label>
        </router-link>
      </FormItem>
      <FormItem class="w-100" label="逾期未付数量">
        <router-link :to="'/paymentStatistics/yuqiweifu'">
          <label>{{ unPaid.count }}</label>
        </router-link>
      </FormItem>
      <FormItem class="w-100" label="已还款待确认数量">
        <router-link :to="'/paymentStatistics/yihuankuandaiqueren'">
          <label>{{ reviewed.count }}</label>
        </router-link>
      </FormItem>
    </Form>
  </Layout>
</template>

<script>
export default {
  data() {
    return {
      PaymentStatistics: {},
      unPaid: {},
      reviewed: {},
    }
  },
  created: function() {
    this.init()
  },

  methods: {
    init: function() {
      this.searchPaymentStatistics()
    },
    searchPaymentStatistics: function() {
      let self = this
      this.http
        .get({
          url: '/payment/statistics',
        })
        .then((data) => {
          console.log(data)
          self.PaymentStatistics = data
        })
      this.http
        .get({
          url: '/paymentItem/list/unpaid/count',
        })
        .then((data) => {
          console.log(data)
          self.unPaid = data
        })
      this.http
        .get({
          url: '/paymentItem/list/reviewed/count',
        })
        .then((data) => {
          console.log(data)
          self.reviewed = data
        })
    },
  },
}
</script>

<style></style>
